/**
 * Created by Deng on 2018/4/26.
 * 1rem=100PX方案
 */
(function (window, document) {

    function resize(){
        var ww = window.innerWidth;
        if (ww > window.screen.width) {
            window.requestAnimationFrame(resize);
        }
        else {
            if (ww > 750) ww = 750;
            document.documentElement.style.fontSize = ww * 100 / 750 + 'px';
        }
    }

    if (document.readyState !== 'loading') {
        resize();
    } else {
        document.addEventListener('DOMContentLoaded', resize);
    }

    window.addEventListener('resize', resize);

})(window, document);